﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain.BLL;
namespace Domain.DAL
{
    public class CategoryDAL
    {
        public List<CategoryBLL> ListAllCategories()
        {
            using (var ctx = new CSEntities())
            {
                var _cat = (from _c in ctx.Categories
                           select new CategoryBLL
                           {
                               CategoryID = _c.CategoryID,
                               CategoryName = _c.CategoryName,
                               Description = _c.Description,
                           });

                return _cat.ToList();
            }
        }
    }
}
